package com.netintech.core.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 配置app登录拦截器
 * @author admin
 */
@Configuration
public class WebConfigurer implements WebMvcConfigurer {

    @Autowired
    private AppLoginInterceptor appLoginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //配置拦截器和拦截路径
        registry.addInterceptor(appLoginInterceptor).addPathPatterns("/testApp/**");
    }
}
